//获取cals.js中的add 方法
var v1 = document.querySelector("#v1");
var v2 = document.querySelector("#v2");
var bt = document.querySelector("#bt");
var res = document.querySelector("#res");


//2.导入site.css文件
/* require('../statics/css/cite.css');
require('../statics/mui/css/icons-extra.css');
require('../statics/css/site1.scss');
require('../statics/css/site2.less'); */

//用es6语法导入
import '../statics/css/cite.css';
import '../statics/mui/css/icons-extra.css';
import '../statics/css/site1.scss';
import '../statics/css/site2.less';

import addObj from './cals.js';

bt.onclick = function () {
    var v1value = parseFloat(v1.value);
    var v2value = parseFloat(v2.value);
    /* var add = require('./cals.js'); */
    res.value = addObj.add(v1value, v2value);
}